2. COURSE DESIGN AND IMPLEMENTATION 22
how random choice and lists impact the way the mad libs would turn out. Following this,
students read out the results of their mad libs and discuss how the activity might relate
to coding. Oftentimes the students would come up with the word ”randomness” on their
own, but if the discussion didn’t touch on that, instructors would bring it up.
Using iPython notebooks, instructors would lead students through a short coding ”boot
camp” teaching them how to use lists, print strings, create functions, and use loops. [1]
The students would get a chance to try each of the examples on their own computers,
using a blank iPython notebook. Each example became more complex.
Once students had a rough idea of how programs in Python worked, the instructor had
students open up a pre-written iPython notebook containing code that produces a short
love letter, based off of Christopher Strachey’s original love letter generator, written in
1952. [17]
Students were encouraged to perform a ”close reading” similar to what they would
be doing in their Language and Thinking classes. After a few minutes, the instructor
walks them through each line of the code, asking for students to speak up if any line was
confusing, or if they wanted to make a guess as to what the code was doing. Once the
students understood where the text was coming from, they were encouraged to change the
words in the lists for each part of speech, however they wanted to.
By changing the words in the list of adjectives and salutations, students could get the
code to generate wildly differing letters. Additionally, they were encouraged to change
the Python code outside of the lists of strings. This allowed for even more variation, and
depending on the skill level of students, encouraged students to challenge themselves.
Instructors gave examples of previous modifications of the code, including hate letters,
complaint letters, and love letters with abbreviations and texting lingo. More advanced
students were encouraged to change the text that created the structure of the sentences,